<!DOCTYPE html>

<html>
<head>
	<title>Nerv Widgets 3</title>
	
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></meta> 
	
	<link rel="stylesheet" href="../../themes/nw3/form.css" type="text/css" media="all"></link>
	
	<script src="../../nw3.js" type="text/javascript"></script>
	<script src="../../plugins/form/form.js" type="text/javascript"></script>
	<script src="../../langs/it.js" type="text/javascript"></script>
</head>


<body>

<script>
// stampa titolo pagina
window.document.title = NW3.toString();
</script>


<br />
Nerv Form Plugin: Input Button

<br />
<br />
<br />

<label>Replace a link:</label>
<br />
<br />
<a id="link" href="#anchor">Button like a link</a>
<script>
oButton = new NW3.form.Button({
	replace	: '#link'
});
</script>

<br />
<br />
<br />
<label>Replace a input submit button:</label>
<br />
<br />
<input id="submit" type="submit" value="Button like input submit" />
<script>
oButton = new NW3.form.Button({
	replace	: '#submit',
	onclick : function(){
		alert('Submit!');
	}
});
</script>

<br />
<br />
<hr />
<br />
<br />

<script>
oButton = new NW3.form.Button({
	text : 'OK',
	width : '55'
});
oButton.print();

oButton2 = new NW3.form.Button({
	text : 'Cancel',
	width : '55'
});
oButton2.print();

oButton3 = new NW3.form.Button({
	text : 'Apply',
	width : '55'
});
oButton3.print();
</script>
<br />
<br />
<br />

<script>
oButton4 = new NW3.form.Button({
	text : 'Favorites',
	width : '80',
	image : '../img/star.png',
	onclick : function(){
		alert('Running!');
	}
});
oButton4.print();
</script>


<br />
<br />
<br />

<script>
oButton5 = new NW3.form.Button({
	text : 'Disabled',
	status : 'disabled',
	onclick : function(){
		alert('Enabled!');
	}
});
oButton5.print();
</script>
<script>
oButton6 = new NW3.form.Button({
	text : 'Enabled',
	onclick : function(){
		oButton5.setStatus('enabled');
		oButton5.setText('Enabled');
		oButton5.setImage('../img/star.png');
	}
});
oButton6.print();
</script>

<br />
<br />
<br />
<hr />

<br />
<br />
<script>
oButton7 = new NW3.form.Button({
	text : 'Shortcut',
	onclick : function(){
		alert('Running Shortcut');
	},
	keyshortcut : {
		key : 's',
		action : function(){
			alert('Running Shortcut');
		}
	}
});
oButton7.print();
</script>
<script>
oButton8 = new NW3.form.Button({
	text : 'Shortcut2',
	onclick : function(){
		alert('Running Shortcut2');
	},
	keyshortcut : {
		key : 't',
		action : function(){
			alert('Running Shortcut2');
		}
	}
});
oButton8.print();
</script>


</body>
</html>
